/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package vn.edu.fpt.xml.hrm.controller.auth;

import java.io.File;
import java.io.IOException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.w3c.dom.Document;
import org.xml.sax.SAXException;

/**
 *
 * @author ANHNH8
 */
public class XMLUtil {
    public static Document createDOMTree(String path) throws ParserConfigurationException,SAXException,IOException{
        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
        DocumentBuilder db = dbf.newDocumentBuilder();
        File f = new File(path);
        Document doc = db.parse(f);
        return doc;
    }

}
